<table summary="" id="pagehead" cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td><h1>文章管理</h1></td>
		<td class="actions">
			<table summary="" cellpadding="0" cellspacing="0" border="0" align="right">
				<tr>
                	<td <?=$this->list_act ?>><a href="<?='?app='.APP.'&mod='.MOD;?>">文章列表</a></td>
					<td <?=$this->add_act ?>><a href= "<?='?app='.APP.'&mod='.MOD.'&act=add';?>">发布文章</a></td>
					<td <?=$this->edit_act ?>><a href="#">编辑文章</a></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<style>
.cib {
    border:solid 3px green;
}
</style>
<script>

// 初始化kindeditor
editor = '';
var eoptions = {
    width:'600px',
    height:'500px',
    uploadJson:'?app=<?=APP?>&mod=<?=MOD?>&act=upload&inajax=1&r='+Math.random(),
    fileManagerJson:'?app=portal&mod=filemanager&case=article',
    allowFileManager:true,
    allowMediaUpload:false,
    allowFlashUpload:false,
    urlType:'relative',
    items:['source','fullscreen','quickformat','preview','|','cut','copy','paste','wordpaste','|','fontname','fontsize','forecolor', 'hilitecolor', 'bold', 'italic', 'underline','|','selectall','justifyleft','justifycenter','justifyright','justifyfull','insertorderedlist','insertunorderedlist','|','indent','outdent','subscript','superscript','formatblock','|','image','flash','|','table','link','unlink']
};

KindEditor.ready(function(K){
    editor = K.create('#desc',eoptions);
});

$(function(){
    $('#form').submit(function(){
        // 同步编辑器内容
        editor.sync();
		
		if($('#cid').val()=='')
		{
			alert('请选择文章分类!');
			return false;
		}
		
        // ajax发送数据
        $.post(location.href,$(this).serialize(),function(data){
			alert(data.message);
            if (data.state <= 0)
            {
                if(data.extra != '') $('#'+data.extra).focus();
                return false;
            }
			window.location = '<?='?app='.APP.'&mod='.MOD;?>';
        },'json');
        return false;
    });
});
</script>
<div class="edit_tab tab">
<div class="bg1">
<div class="bg2">
      <span rel="info" class="span_now"><?=$this->node_name?></span>
</div>
</div>
</div>
<div class="order_show" id="info_form">
<form id="form">
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
            <tr>
                <td class="td1" width="15%">文章标题：</td>
                <td><input type="text" name="title" style="width:400px;" value="<?=$this->article['title']?>" />&nbsp;&nbsp;&nbsp;&nbsp;<font color="#848484">200个字符以内</font></td>
            </tr>
            <tr>
                <td class="td1" width="15%">文章分类：</td>
                <td><?=$this->article_class?></td>
            </tr>
            <tr>
                <td class="td1" width="15%">排序码：</td>
                <td><input type="text" name="sort" style="width:400px;" value="<?=$this->article['sort']?>" /></td>
            </tr>
            <tr>
                <td class="td1" width="15%">文章简介：</td>
                <td>
                <textarea rows="7"  cols="60" id="description" name="description"><?php echo $this->article['description']; ?></textarea>
                </tr>
            <tr>
                <td class="td1" width="15%">文章内容：</td>
                <td><textarea  id="desc" name="desc"><?php echo $this->article['content']; ?></textarea></td>
            </tr>
            <tr>
                <td class="td1" colspan="2" style="text-align:center">
					<input name="" type="submit" class="btn1" value="确定" />
                    <input name="act" type="hidden"  class="btn1" value="<?=$this->act?>" />
				</td>
            </tr>
	</table>
</form>
</div>